Don't get the default display when we compute the Aerosnap region, but instead
get it from the underlying GdkSurface that we are using for the computation.
Also, don't unref the monitors that we obtain from the display in the wrong
place, which was why we had crashes whenever we triggered AeroSnap code (and we
are actually not supposed to do that as they are owned by the GdkDisplay that
is owned by the GdkSurface we are using), and this will eliminate lots of
criticals that are spewed as a result.
int i;
#endif
- display = gdk_display_get_default ();
+ display = gdk_surface_get_display (context->window);
monitors = gdk_display_get_monitors (display);
#define _M_UP 0
GdkMonitor *monitor;
monitor = g_list_model_get_item (monitors, monitor_idx);
- g_object_unref (monitors);
gdk_win32_monitor_get_workarea (monitor, &wa);
gdk_monitor_get_geometry (monitor, &geometry);
GdkSurfaceEdge edge,
GdkDevice *device,
int button,
- int x,
- int y,
+ double x,
+ double y,
guint32 timestamp)
{
RECT rect;